import React, { Component } from 'react'
import Child1 from './views/Child1'
import Child2 from './views/Child2'

export default class App extends Component {
  constructor(){
    super()
    this.state={num:0}
  }
  render() {
    console.log('------App的render-----------');
    return (
      <div style={{
        display:'flex',
        justifyContent:'space-between',
        padding:'20px',
        width:'600px',
        height:'300px',
        backgroundColor:'springgreen'
      }}>
        <button onClick={()=>{this.setState({num:this.state.num+1})}}>App更新</button>
        <Child1></Child1>
        <Child2></Child2>
      </div>
    )
  }
}
